<div id="facebook_twitter">
   <a href="<?php echo Configure::read('App.facebookLink');?>" target="new"><?php echo $this->Html->image('facebook_icon_small.png', array('alt' => 'Like us on facebook','title'=>'Like us on facebook', 'class'=>'rightOnly plain'))?></a>
  <a href="<?php echo Configure::read('App.twitterLink');?>" target="new"><?php echo $this->Html->image('twitter_icon_small.png', array('alt' => 'Follow us on twitter','title'=>'Follow us on twitter', 'class'=>'rightOnly plain'))?></a>
  <a href="<?php echo Configure::read('App.pinterestLink');?>" target="new"><?php echo $this->Html->image('pinterest-logo.png', array('alt' => 'Follow us on pinterest','title'=>'Follow us on pinterest', 'class'=>'rightOnly plain'))?></a>
</div>

<nav id="footerLinks">
  <div class="footerSection">
    <h1>Isle Vow</h1>
    <ul class="navBlock">
      <li><?php echo $this->Html->link('Home', '/weddings-in-trinidad-and-tobago') ?></li>
      <li><?php echo $this->Html->link('About Us', '/about-us') ?>
      <li><?php echo $this->Html->link('Advice', '/caribbean-wedding-information') ?></li>
      <li><?php echo $this->Html->link('Destination Weddings', '/destination-weddings-trinidad-and-tobago') ?></li>
      <li><?php echo $this->Html->link('Gallery', '/image-gallery') ?></li>
      <li><?php echo $this->Html->link('Contact', '/contact') ?></li>
      <li><?php echo $this->Html->link('Legal', '/legal') ?></li>
    </ul>
  </div>

  <?php
    $services = $this->Session->read('Services');
    if(empty($services)) {
      $services = $this->requestAction(array('controller'=>'services', 'action'=>'menu'));
    } //http://money.cnn.com/

    if (!empty ($services)) {
      if (sizeof($services)>3) {
      for ($j=0; $j<3; $j++){
        echo '<div class="footerSection">';
        $header = $j==0 ? "Services" : "&nbsp;";
        echo '<h1>'.$header.'</h1>';

        echo '<ul class="navBlock">';
          for ($i=$j; $i < sizeof($services); $i = $i+3 ) { $service = $services[$i];
           echo '<li>'.$this->Html->link($service['Service']['name'], array('controller'=>'companies', 'action'=>'company_service',$service['Service']['id'])).'</li>';
          }
        echo '</ul>';
        echo '</div>';
      } } else {
         echo '<div class="footerSection">';
          echo '<h1>Services</h1>';

          echo '<ul class="navBlock">';
            for ($i=0; $i < sizeof($services); $i++ ) { $service = $services[$i];
             echo '<li>'.$this->Html->link($service['Service']['name'], array('controller'=>'companies', 'action'=>'company_service',$service['Service']['id'])).'</li>';
            }
          echo '</ul>';
          echo '</div>';
      }
    }
 ?>

</nav>

<div id="rightFooterImage"><?php echo $this->Html->image('footer-graphic.png', array('alt' => 'Isle Vow','title'=>'Isle Vow', 'class'=>'plain'))?></div>

<div id="footerText">
  <p>Copyright &copy; 2012 Isle Vow. All Rights Reserved.</p>
  <p><?php echo $this->Html->link('Legal', '/legal', array('class'=>'contact')) ?> | Email:<a href="mailto:&#105;&#110;&#102;&#111;&#064;&#105;&#115;&#108;&#101;&#118;&#111;&#119;&#046;&#099;&#111;&#109;" class="contact">&#105;&#110;&#102;&#111;&#064;&#105;&#115;&#108;&#101;&#118;&#111;&#119;&#046;&#099;&#111;&#109;</a></p>
</div>